<template>
  <div class="container_pic">
    <!-- 上半部分 -->
    <div class="upper-section">
      <div class="section left">
        <img src="../../picku/wordcloud.png" alt="Image 1" class="image">
        <p class="description">用户画像</p>
      </div>
      <div class="section right">
        <img src="../../picku/wordcloud1.png" alt="Image 2" class="image">
        <p class="description">用户画像</p>
      </div>
    </div>
    <!-- 下半部分 -->
    <div class="lower-section">
      <div class="section left">
        <img src="../../picku/wordcloud2.png" alt="Image 3" class="image">
        <p class="description">用户画像</p>
      </div>
      <div class="section right">
        <img src="../../picku/wordcloud.png" alt="Image 4" class="image">
        <p class="description">用户画像</p>
      </div>
    </div>
  </div>
</template>

<style>
.container_pic {
  display: flex;
  flex-wrap: wrap;
  height: 590px;
  width: 1050px;
  max-width: 1050px;
  margin: 50px auto;
  background-color: var(--background-color);
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.upper-section,
.lower-section {
  flex: 1;
  justify-content: space-between;
  width: 520px;
  margin-bottom: 20px;
}

.section {
  width: 430px;
  height: 250px;
  margin: 0 1%;
  position: relative;
  display: flex;
  align-items: center; /* 垂直居中 */
  justify-content: center; /* 水平居中 */
}

.image {
  width: 90%;
  height: 90%;

}

.description {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 98%;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px;
  text-align: center;
  opacity: 0; /* 默认不显示描述 */
  transition: opacity 0.3s ease-in-out; /* 平滑过渡效果 */
}

.section:hover .description {
  opacity: 1; /* 鼠标悬停时显示描述 */
}
</style>